Skip to content

fix: resolve cross-package test failures and type errors#16

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/job-e2e-tier3-2447-1779835685
Open

fix: resolve cross-package test failures and type errors#16
stooit wants to merge 1 commit into
mainfrom
quantcode/job-e2e-tier3-2447-1779835685

Conversation

@stooit
Copy link
Copy Markdown
Contributor

@stooit stooit commented May 26, 2026

Summary

Fixes all failing tests and type errors across the monorepo. All 13 tests now pass with bun test and npx tsc --noEmit reports no source-file type errors.

Changes

  • packages/utils/src/index.ts — Re-exported useDebounce as useSearchDebounce (hook was renamed but consumers still expected the old name). Also exported useThrottle.
  • apps/web/src/lib/api.ts — Fixed import to use the correct export name from @e2e/utils.
  • packages/utils/src/format/date.ts — Changed date format from dd/MM/yyyy to d/MM/yyyy to omit leading zero on day.
  • packages/ui/src/components/Button/Button.tsx — Added aria-label prop passthrough for accessibility on icon-only buttons.
  • packages/ui/src/components/DataTable/DataTable.tsx — Fixed stale closure bug in sort handler by using functional state update.
  • bunfig.toml (root) — Added happy-dom preload so DOM is available for UI component tests when running bun test from root.

Assumptions

  • The bun:test type errors in test files are expected (would require @types/bun to resolve, which is a new dependency — out of scope).
  • The useSearchDebounce alias preserves backward compatibility while keeping the renamed useDebounce as the canonical export.

- Re-export useDebounce as useSearchDebounce in packages/utils
- Export useThrottle from packages/utils and fix import in apps/web
- Fix date formatting to omit leading zero on day (d/MM/yyyy)
- Add aria-label prop passthrough to Button component for icon-only buttons
- Fix stale closure in DataTable sort handler using functional state update
- Configure happy-dom preload in root bunfig.toml for UI component tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant